import os # Get the name of the current script current_script = os.path.basename(__file__) # Get all files and directories in the current directory files_in_directory = os.listdir() # Loop through the files and directories for file in files_in_directory: # Check if it's a file (not a directory) and not the current script if os.path.isfile(file) and file != current_script: print(file)